﻿using System;
using System.Windows.Forms;

namespace aboveUHSReader
{
  public partial class Form1 : Form
  {
    private readonly UHSFile m_uhsFile = new UHSFile();

    public Form1()
    {
      InitializeComponent();
      panelTextbox.Dock = DockStyle.Fill;
      panelImage.Dock = DockStyle.Fill;
      WindowState = FormWindowState.Maximized;
    }

    private void Form1_Load(object sender, EventArgs e)
    {
      m_uhsFile.Show(this, treeView, textBox, pictureBox, @"mm8.uhs");
    }

    private void FindToolStripMenuItemClick(object sender, EventArgs e)
    {
      var find = new Find();
      if (find.ShowDialog() == DialogResult.OK)
        m_uhsFile.Search(find.textBox.Text);
    }

    private void NextToolStripMenuItemClick(object sender, EventArgs e)
    {
      m_uhsFile.NextSearchResult();
    }
  }
}